'use strict';

var resJson = require('../utils/resJson.js');

var controller = {

};

//登录验证
controller.loginCheckByAjax = function(req, res, next) {
    var user = req.session ? req.session.user : null;
    if (!user) {
    	return resJson(res,null,'没有合法身份,请先登录.',401);
    }
    next();
};

module.exports = controller;
